(defun c:xmlist ()
  (setq filepath (dos_getdir "Select Image Folder" (if filepath filepath "")))
  (if ustr nil (load "ustr" "\nFile USTR.LSP was not loaded!"))
  (setq groupname (ustr 1 "" "Enter a group name for these images" (if groupname groupname "")))
  (setq pathtokens (dos_strtokens filepath "\\"))
  (setq splitpath (dos_splitpath filepath))
  (setq filelist (dos_dir (STRCAT filepath "*.jpg")))
  (setq imagelist (open (strcat filepath (strcat groupname " images.xml")) "w"))
  (setq itemcnt 1000)
  (foreach n filelist
    (write-line (strcat "      <img src=\"" n "\" thumb=\"" n "\" itemName=\"" groupname " " n "\" itemNumber=\"" (last pathtokens) "-" (itoa itemcnt) "\"/>") imagelist)
    (setq itemcnt (1+ itemcnt))
  )
  (close imagelist)
;;;	<img src="DMC_4649.jpg" thumb="DMC_4649.jpg" itemName="2010 Member-Guest 4649" itemNumber="10MG4649"/>
)